local CommonOHOH = _G.CommonOHOH;
local M = CommonOHOH.class.new(script,script.Parent.AFKBase);
local GroupReward_cfg = CommonOHOH.config.GroupReward
function M.new(...)
	return M(...);
end;

function M.ctor(self,...)--构造函数
	M.super.ctor(self,...);
end;
function M.dtor(self)--析构函数
    M.super.dtor(self);
end;

--只在进入游戏的时候检查一次
function M.SubInit(self)
    self.isDone = self.player.main_inst:IsInGroup(GroupReward_cfg.groupId)
    self.UpdateEvent:Action()
end


function M.RemoveUse(self)
    if not self.RngDataCtrl then
        self.RngDataCtrl=self.player:GetComponent(_G.CommonOHOH.load.Common_RngDataLayer())
    end
    self.RngDataCtrl:AddLucky(-self.value)
end

function M.Use(self)
    if not self.RngDataCtrl then
        self.RngDataCtrl=self.player:GetComponent(_G.CommonOHOH.load.Common_RngDataLayer())
    end
    self.RngDataCtrl:AddLucky(self.value)
end


return M